<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:U('Admin/LiveProp/index')}">道具列表</a></li>
			<li><a href="{:U('Admin/LiveProp/add')}">添加道具</a></li>
		</ul>
		<form class="well form-search" id="query_form" method="post" action="{:U('Admin/LiveProp/index')}">
			名称： 
			<input type="text" name="name" style="width: 120px;" value="{$formParam.name}" placeholder="道具名称...">
			状态： 
			<select class="select_2" name="status" style="width: 90px;">
				<option value='-1'>全部</option>
				<option value='1' <if condition="$formParam.status eq 1"> selected </if>>启用</option>
				<option value='0' <if condition="$formParam.status eq 0"> selected </if>>停用</option>
			</select>
			<input type="button" name="query_form_btn" id="queryBtn" data-action="{:U('Admin/LiveProp/index')}" class="btn btn-primary" value="查询" />
		</form>
		<form class="js-ajax-form" action="" method="post">
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th>道具名称</th>
					<th>道具图标</th>
					<th>汇闻币数量</th>
					<th>道具描述</th>
					<th>状态</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<php>
					 $status = array("0"=>'停用',"1"=>'启用');
				</php>
				<foreach name="data" item="vo">
				<tr>
					<td><a href='{:U("Admin/LiveProp/view", array("propId"=>number_format($vo["propId"], 0, "", "")))}' title="查看详情">{$vo.name}</a></td>
					<td><a href="{$vo.icon}" target="_blank"><img src="{$vo.icon}" style="width:30px;height:30px;"/></a></td>
					<td>{$vo.amount}</td>
					<td>{$vo.remark}</td>
					<td>{$status[$vo['status']]}</td>
					<td>
						<a href='{:U("Admin/LiveProp/edit",array("propId"=>$vo["propId"]))}'>编辑</a>
						<if condition="$vo.status eq 1"> 
							<a href='{:U("Admin/LiveProp/disable",array("propId"=>$vo["propId"]))}' class="js-ajax-dialog-btn">停用</a>
						</if>
						<if condition="$vo.status eq 0"> 
							<a href='{:U("Admin/LiveProp/enable",array("propId"=>$vo["propId"]))}' class="js-ajax-dialog-btn">启用</a>
						</if>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		</form>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
	<script>
	$(document).ready(function(){
		$('input[name="query_form_btn"]').click(function(){
			 $('#query_form').attr('action', $(this).attr('data-action'));
			 $('#query_form').submit();
		});
		
	});
	</script>
</body>
</html>